import { http } from '@/utils/http'

/**
 * 详情
 */
export const getDetailApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/detail',
    data: params,
  })
}
/**
 * 车辆保险列表
 */
export const getCarInsureDetailApi = (params, insureKind) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/findDetail',
    data: {
      id: params.id,
      pageNumber: 1,
      pageSize: 1000,
      insureKind: insureKind,
      carId: params.carId,
    },
  })
}
/**
 * 退保
 */
export const refundInsureApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/refundInsure',
    data: params,
  })
}
/**
 * 续保
 */
export const renewInsureApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/renewInsure',
    data: params,
  })
}
/**
 * 新增
 */
export const addApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/insertInsure',
    data: params,
  })
}
/**
 * 编辑
 */
export const editApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/editInsure',
    data: params,
  })
}
/**
 * 删除
 */
export const deleteApi = (params) => {
  return http({
    method: 'POST',
    url: '/V5/carInsurance/deleteInsure',
    data: params,
  })
}
